import { BroadCastCall } from "../../broadCast/BroadCastCall";
import { MessageBlock } from "../../../../../Framework/MQ/MessageBlock";
import { Cache } from "../../../cache/Cache";
import { SCopyMsgInfo } from "../../../../../Message/Public/SCopyMsgInfo";
import { NetDispatcher } from "../../../../mvc/core/NetDispatcher";
import { ServerCommand } from "../../../mvc/ServerCommand";
//class CopyPublicCopyMsgCommand
    
    export  class CopyPublicCopyMsgCommand extends BroadCastCall
    {
        constructor(arg1: Object)
        {
            super(arg1);
            return;
        }

        public /* override */ call(arg1: MessageBlock): void
        {
            var loc1=null;
            super.call(arg1);
            if (!Cache.instance.copy.copyInfo || Cache.instance.copy.copyInfo && !(Cache.instance.copy.copyInfo.code == 104)) 
            {
                loc1 = arg1.messageBase as SCopyMsgInfo;
                Cache.instance.copy.msgInfo = loc1;
                NetDispatcher.dispatchCmd(ServerCommand.Copy_RefreshCountDownInfo, loc1);
            }
            return;
        }
    }
